this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};(function(e,a,t){"use strict";var l,i,s,r,n,d,b,o;function c(e,a){h(e,a);a.add(e)}function v(e,a,t){h(e,a);a.set(e,t)}function h(e,a){if(a.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function p(e,a,t){if(!a.has(e)){throw new TypeError("attempted to get private field on non-instance")}return t}var u=new WeakMap;var g=new WeakMap;var H=new WeakMap;var F=new WeakMap;var P=new WeakMap;var w=new WeakMap;var f=new WeakMap;var G=new WeakMap;var S=new WeakMap;var k=new WeakMap;var m=new WeakMap;var L=new WeakMap;var T=new WeakMap;var M=new WeakSet;var W=new WeakSet;var E=new WeakSet;var I=new WeakSet;var A=new WeakSet;var B=new WeakSet;var C=function(){function e(a){babelHelpers.classCallCheck(this,e);c(this,B);c(this,A);c(this,I);c(this,E);c(this,W);c(this,M);v(this,u,{writable:true,value:null});v(this,g,{writable:true,value:void 0});v(this,H,{writable:true,value:void 0});v(this,F,{writable:true,value:void 0});v(this,P,{writable:true,value:void 0});v(this,w,{writable:true,value:void 0});v(this,f,{writable:true,value:void 0});v(this,G,{writable:true,value:void 0});v(this,S,{writable:true,value:void 0});v(this,k,{writable:true,value:void 0});v(this,m,{writable:true,value:void 0});v(this,L,{writable:true,value:void 0});v(this,T,{writable:true,value:void 0});babelHelpers.classPrivateFieldSet(this,g,a.node);babelHelpers.classPrivateFieldSet(this,H,a.input);babelHelpers.classPrivateFieldSet(this,F,a.urlLandingAdd||null);babelHelpers.classPrivateFieldSet(this,P,a.urlFolderAdd||null);babelHelpers.classPrivateFieldSet(this,w,a.urlFormAdd||null);babelHelpers.classPrivateFieldSet(this,f,a.siteType);babelHelpers.classPrivateFieldSet(this,G,a.siteId);this.folderId=a.folderId;this.landingId=a.landingId;babelHelpers.classPrivateFieldSet(this,S,a.items||[]);babelHelpers.classPrivateFieldSet(this,k,a.onSelect);babelHelpers.classPrivateFieldSet(this,m,BX("landing-selector"));if(babelHelpers.classPrivateFieldGet(this,g)){t.Event.bind(babelHelpers.classPrivateFieldGet(this,H),"click",p(this,W,D).bind(this));t.Event.bind(babelHelpers.classPrivateFieldGet(this,H),"input",p(this,B,O).bind(this))}}babelHelpers.createClass(e,[{key:"onAddPage",value:function e(){alert(this.landingId)}},{key:"onAddFolder",value:function e(){alert(this.folderId)}}]);return e}();function X(){if(!babelHelpers.classPrivateFieldGet(this,u)){babelHelpers.classPrivateFieldSet(this,u,new a.Dialog({targetNode:babelHelpers.classPrivateFieldGet(this,g),width:565,height:300,enableSearch:false,dropdownMode:true,showAvatars:true,compactView:false,dynamicLoad:true,multiple:false,context:"landing",entities:[{id:"landing",options:{siteType:babelHelpers.classPrivateFieldGet(this,f),siteId:babelHelpers.classPrivateFieldGet(this,G),landingId:this.landingId}}],items:babelHelpers.classPrivateFieldGet(this,S),events:{onHide:p(this,I,_).bind(this),"Item:onSelect":babelHelpers.classPrivateFieldGet(this,k)},footer:[babelHelpers.classPrivateFieldGet(this,F)?t.Tag.render(l||(l=babelHelpers.taggedTemplateLiteral(['<a href="','" class="ui-selector-footer-link ui-selector-footer-link-add">',"</a>"])),babelHelpers.classPrivateFieldGet(this,F),t.Loc.getMessage("LANDING_SELECTOR_ADD_PAGE")):t.Tag.render(i||(i=babelHelpers.taggedTemplateLiteral([""]))),babelHelpers.classPrivateFieldGet(this,F)?t.Tag.render(s||(s=babelHelpers.taggedTemplateLiteral(['<span class="ui-selector-footer-conjunction">',"</span>"])),t.Loc.getMessage("LANDING_SELECTOR_ADD_OR")):t.Tag.render(r||(r=babelHelpers.taggedTemplateLiteral([""]))),babelHelpers.classPrivateFieldGet(this,P)?t.Tag.render(n||(n=babelHelpers.taggedTemplateLiteral(['<a href="','" class="ui-selector-footer-link">',"</a>"])),babelHelpers.classPrivateFieldGet(this,P),t.Loc.getMessage("LANDING_SELECTOR_ADD_FOLDER")):t.Tag.render(d||(d=babelHelpers.taggedTemplateLiteral([""]))),babelHelpers.classPrivateFieldGet(this,w)?t.Tag.render(b||(b=babelHelpers.taggedTemplateLiteral(['<a href="','" class="ui-selector-footer-link ui-selector-footer-link-add">',"</a>"])),babelHelpers.classPrivateFieldGet(this,w),t.Loc.getMessage("LANDING_SELECTOR_ADD_FORM")):t.Tag.render(o||(o=babelHelpers.taggedTemplateLiteral([""])))]}))}return babelHelpers.classPrivateFieldGet(this,u)}function D(){p(this,E,y).call(this)}function y(){p(this,M,X).call(this).show();p(this,A,N).call(this);BX.addClass(babelHelpers.classPrivateFieldGet(this,g),"landing-selector-active")}function _(){var e=this;if(babelHelpers.classPrivateFieldGet(this,T)===true){BX.addClass(babelHelpers.classPrivateFieldGet(this,L),"landing-selector-overlay-hiding");setTimeout((function(){BX.removeClass(babelHelpers.classPrivateFieldGet(e,L),"landing-selector-overlay-hiding");BX.remove(babelHelpers.classPrivateFieldGet(e,L))}),200);babelHelpers.classPrivateFieldSet(this,T,false)}BX.removeClass(babelHelpers.classPrivateFieldGet(this,g),"landing-selector-active")}function N(){if(!babelHelpers.classPrivateFieldGet(this,L)){babelHelpers.classPrivateFieldSet(this,L,BX.create("div",{props:{className:"landing-selector-overlay"}}))}if(babelHelpers.classPrivateFieldGet(this,T)!==true){document.querySelector(".landing-ui-panel.landing-ui-panel-top").appendChild(babelHelpers.classPrivateFieldGet(this,L));babelHelpers.classPrivateFieldSet(this,T,true)}}function O(e){if(babelHelpers.classPrivateFieldGet(this,u)){babelHelpers.classPrivateFieldGet(this,u).show();babelHelpers.classPrivateFieldGet(this,u).search(e.srcElement.value)}}e.Selector=C})(this.BX.Landing.Component=this.BX.Landing.Component||{},BX.UI.EntitySelector,BX);
//# sourceMappingURL=script.map.js